<!doctype html>
<html ng-app="myApp">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>TrainTicket Admin</title>
    <meta name="description" content="This is the admin page of TrainTicket system">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="assets/css/admin.css">
    <link rel="stylesheet" href="assets/css/app.css">
    <script type="text/javascript" src="assets/js/angular.js"></script>
    <script type="text/javascript" src="assets/js/admin_user.js"></script>
</head>

<body data-type="generalComponents" onload="loadBody()">
    <header class="am-topbar am-topbar-inverse admin-header">
        <div class="am-topbar-brand">
            <a href="javascript:;" class="tpl-logo">
                <img src="assets/img/logo.png" alt="">
            </a>
        </div>
        <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right">

        </div>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
                class="am-icon-bars"></span></button>

        <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

            <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
                <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"
                        class="tpl-header-list-link"><span class="am-icon-arrows-alt"></span> <span
                            class="admin-fullText">FullScreen</span></a></li>

                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="tpl-header-list-user-nick" id="admin_name">Default admin</span><span
                            class="tpl-header-list-user-ico"> <img id="avatar_img"></span>
                    </a>
                </li>
                <li><a href="javascript:logout()" class="tpl-header-list-link"><span
                            class="am-icon-sign-out tpl-header-list-ico-out-size"></span></a></li>
            </ul>
        </div>
    </header>

    <div class="tpl-page-container tpl-page-header-fixed" ng-controller="indexCtrl">
        <div class="tpl-left-nav tpl-left-nav-hover">
            <div class="tpl-left-nav-title">
                Management
            </div>
            <div class="tpl-left-nav-list">
                <ul class="tpl-left-nav-menu">
                    <li class="tpl-left-nav-item">
                        <a href="admin.html" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-list-alt"></i>
                            <span>Order</span>
                        </a>
                    </li>
                    <li class="tpl-left-nav-item">
                        <a href="admin_route.html" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-line-chart"></i>
                            <span>Route</span>
                        </a>
                    </li>

                    <li class="tpl-left-nav-item">
                        <a href="admin_travel.html" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-globe"></i>
                            <span>Travel</span>
                        </a>
                    </li>

                    <li class="tpl-left-nav-item" class="nav-link active">
                        <a href="#" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-users"></i>
                            <span>User</span>
                            <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                        </a>
                    </li>

                    <li class="tpl-left-nav-item">
                        <!-- 打开状态 a 标签添加 active 即可   -->
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>Basic</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                                <!-- 打开状态 a 标签添加 active 即可   -->
                                <a href="admin_contacts.html" class="active">
                                    <i class="am-icon-user"></i>
                                    <span>Contact</span>
                                </a>

                                <a href="admin_station.html">
                                    <i class="am-icon-institution"></i>
                                    <span>Station</span>
                                </a>

                                <a href="admin_train.html">
                                    <i class="am-icon-train"></i>
                                    <span>Train</span>
                                </a>

                                <a href="admin_price.html">
                                    <i class="am-icon-dollar"></i>
                                    <span>Price</span>
                                </a>

                                <a href="admin_config.html">
                                    <i class="am-icon-cog"></i>
                                    <span>Config</span>
                                </a>
                            </li>
                        </ul>
                    </li>

                </ul>
            </div>
        </div>

        <div class="tpl-content-wrapper">
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        User List
                    </div>

                </div>
                <div class="tpl-block">
                    <div class="am-g">
                        <div class="am-u-sm-12 am-u-md-6">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <button type="button" class="am-btn am-btn-default am-btn-success"
                                        ng-click="addNewUser()"><span class="am-icon-plus"></span> Add</button>
                                    <!--<button type="button" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-save"></span> Save</button>-->
                                    <!--<button type="button" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> Check</button>-->
                                    <!--<button type="button" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> Delete</button>-->
                                </div>
                            </div>
                        </div>
                        <!--<div class="am-u-sm-12 am-u-md-3">-->
                        <!--<div class="am-form-group">-->
                        <!--<select data-am-selected="{btnSize: 'sm'}">-->
                        <!--<option value="option1">所有类别</option>-->
                        <!--<option value="option2">IT业界</option>-->
                        <!--<option value="option3">数码产品</option>-->
                        <!--<option value="option3">笔记本电脑</option>-->
                        <!--<option value="option3">平板电脑</option>-->
                        <!--<option value="option3">只能手机</option>-->
                        <!--<option value="option3">超极本</option>-->
                        <!--</select>-->
                        <!--</div>-->
                        <!--</div>-->
                        <!--<div class="am-u-sm-12 am-u-md-3">-->
                        <!--<div class="am-input-group am-input-group-sm">-->
                        <!--<input type="text" class="am-form-field">-->
                        <!--<span class="am-input-group-btn">-->
                        <!--<button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" type="button"></button>-->
                        <!--</span>-->
                        <!--</div>-->
                        <!--</div>-->
                    </div>
                    <div class="am-g">
                        <div class="am-u-sm-12">
                            <form class="am-form">
                                <table class="am-table am-table-striped am-table-hover table-main">
                                    <thead>
                                        <tr>
                                            <th class="table-set">Operation</th>
                                            <th class="table-title">Id</th>
                                            <th class="table-title">Name</th>
                                            <th class="table-title">Password</th>
                                            <th class="table-title">Gender</th>
                                            <th class="table-title">Email</th>
                                            <th class="table-title">DocumentType</th>
                                            <th class="table-title">DocumentNumber</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ng-repeat=" record in records">
                                            <td>
                                                <div class="am-btn-toolbar my-am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button
                                                            class="am-btn am-btn-default am-btn-xs am-text-secondary"
                                                            ng-click="updateUser(record)"><span
                                                                class="am-icon-pencil-square-o"></span> Update</button>
                                                        <!--<button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>-->
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger"
                                                            ng-click="deleteUser(record.userId)"><span
                                                                class="am-icon-trash-o"></span> Delete</button>
                                                    </div>
                                                </div>
                                            </td>
                                            <td>{{record.userId}}</td>
                                            <td>{{record.userName}}</td>
                                            <td>{{record.password}}</td>
                                            <td>{{record.gender}}</td>
                                            <td>{{record.email}}</td>
                                            <td>{{record.documentType}}</td>
                                            <td>{{record.documentNum}}</td>
                                        </tr>
                                    </tbody>

                                    <!-- Prompt Update User -->
                                    <div class="am-modal am-modal-prompt" tabindex="-1" id="update_prompt">
                                        <div class="am-modal-dialog my-modal-dialog">
                                            <div class="am-modal-hd">Update User</div>
                                            <div class="am-modal-bd">
                                                <div class="am-g tpl-amazeui-form">
                                                    <div class="am-u-sm-12">
                                                        <form class="am-form am-form-horizontal">
                                                            <div class="am-form-group">
                                                                <label for="update_user_id"
                                                                    class="am-u-sm-5 am-form-label">User Id: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" readonly="readonly"
                                                                        id="update_user_id"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="update_user_id">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="update_user_name"
                                                                    class="am-u-sm-5 am-form-label">Name: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="update_user_name"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="update_user_name">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="update_user_password"
                                                                    class="am-u-sm-5 am-form-label">Password: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="update_user_password"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="update_user_password">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="update_user_gender"
                                                                    class="am-u-sm-5 am-form-label">Gender: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="update_user_gender"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="update_user_gender">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="update_user_email"
                                                                    class="am-u-sm-5 am-form-label">Email: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="update_user_email"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="update_user_email">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="update_user_document_type"
                                                                    class="am-u-sm-5 am-form-label">Document Type:
                                                                </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="update_user_document_type"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="update_user_document_type">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="update_user_document_number"
                                                                    class="am-u-sm-5 am-form-label">Document Number:
                                                                </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="update_user_document_number"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="update_user_document_number">
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="am-modal-footer">
                                                <span class="am-modal-btn" data-am-modal-cancel>Cancel</span>
                                                <span class="am-modal-btn" data-am-modal-confirm>Update</span>
                                            </div>
                                        </div>
                                    </div>

                                    <!--Prompt Delete Confirm-->
                                    <div class="am-modal am-modal-confirm" tabindex="-1" id="delete_confirm">
                                        <div class="am-modal-dialog">
                                            <div class="am-modal-hd">Delete User</div>
                                            <div class="am-modal-bd">
                                                Are you sure to delete this user record?
                                            </div>
                                            <div class="am-modal-footer">
                                                <span class="am-modal-btn" data-am-modal-cancel>Cancel</span>
                                                <span class="am-modal-btn" data-am-modal-confirm>Delete</span>
                                            </div>
                                        </div>
                                    </div>

                                    <!-- Prompt Add User -->
                                    <div class="am-modal am-modal-prompt" tabindex="-1" id="add_prompt">
                                        <div class="am-modal-dialog my-modal-dialog">
                                            <div class="am-modal-hd">Add User</div>
                                            <div class="am-modal-bd">
                                                <div class="am-g tpl-amazeui-form">
                                                    <div class="am-u-sm-12">
                                                        <form class="am-form am-form-horizontal">
                                                            <div class="am-form-group">
                                                                <label for="add_user_name"
                                                                    class="am-u-sm-5 am-form-label">Name: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="add_user_name"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="add_user_name">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="add_user_password"
                                                                    class="am-u-sm-5 am-form-label">Password: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="add_user_password"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="add_user_password">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="add_user_gender"
                                                                    class="am-u-sm-5 am-form-label">Gender: </label>
                                                                <div class="am-u-sm-7">
                                                                    <select id="add_user_gender" name="user_gender"
                                                                            class="am-modal-prompt-input">
                                                                        <option value="0">Male</option>
                                                                        <option value="1">Female</option>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="add_user_email"
                                                                    class="am-u-sm-5 am-form-label">Email: </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="add_user_email"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="add_user_email">
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="add_user_document_type"
                                                                    class="am-u-sm-5 am-form-label">Document Type:
                                                                </label>
                                                                <div class="am-u-sm-7">
                                                                    <select id="add_user_document_type" name="document_type"
                                                                            class="am-modal-prompt-input">
                                                                        <option value='1' selected = 'selected'>ID Card</option> +
                                                                        <option value='2'>Passport</option> +
                                                                        <option value='3'>Other</option>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                            <div class="am-form-group">
                                                                <label for="add_user_document_number"
                                                                    class="am-u-sm-5 am-form-label">Document Number:
                                                                </label>
                                                                <div class="am-u-sm-7">
                                                                    <input type="text" id="add_user_document_number"
                                                                        class="am-modal-prompt-input"
                                                                        ng-model="add_user_document_number">
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="am-modal-footer">
                                                <span class="am-modal-btn" data-am-modal-cancel>Cancel</span>
                                                <span class="am-modal-btn" data-am-modal-confirm>Add</span>
                                            </div>
                                        </div>
                                    </div>

                                </table>

                            </form>
                        </div>

                    </div>
                </div>
                <div class="tpl-alert"></div>
            </div>










        </div>

    </div>


    <script src="assets/js/jquery.min.js"></script>
    <script src="assets/js/amazeui.min.js"></script>
    <script src="assets/js/app.js"></script>
</body>

</html>